package com.tancire.net.service.impl;

import java.util.List;
import javax.annotation.Resource;

import com.tancire.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.tancire.net.mapper.CrmCompanyLogMapper;
import com.tancire.net.domain.CrmCompanyLog;
import com.tancire.net.service.ICrmCompanyLogService;

/**
 * 客户操作日志Service业务层处理
 *
 * @author chenchao
 * @date 2023-12-25
 */
@Service
public class CrmCompanyLogServiceImpl implements ICrmCompanyLogService {
    @Resource
    private CrmCompanyLogMapper crmCompanyLogMapper;

    /**
     * 查询客户操作日志
     *
     * @param id 客户操作日志主键
     * @return 客户操作日志
     */
    @Override
    public CrmCompanyLog selectCrmCompanyLogById(Long id) {
        return crmCompanyLogMapper.selectCrmCompanyLogById(id);
    }

    /**
     * 查询客户操作日志列表
     *
     * @param crmCompanyLog 客户操作日志
     * @return 客户操作日志
     */
    @Override
    public List<CrmCompanyLog> selectCrmCompanyLogList(CrmCompanyLog crmCompanyLog) {
        return crmCompanyLogMapper.selectCrmCompanyLogList(crmCompanyLog);
    }

    /**
     * 新增客户操作日志
     *
     * @param crmCompanyLog 客户操作日志
     * @return 结果
     */
    @Override
    public int insertCrmCompanyLog(CrmCompanyLog crmCompanyLog) {
        crmCompanyLog.setCreateTime(DateUtils.getNowDate());
        return crmCompanyLogMapper.insertCrmCompanyLog(crmCompanyLog);
    }

    /**
     * 修改客户操作日志
     *
     * @param crmCompanyLog 客户操作日志
     * @return 结果
     */
    @Override
    public int updateCrmCompanyLog(CrmCompanyLog crmCompanyLog) {
        return crmCompanyLogMapper.updateCrmCompanyLog(crmCompanyLog);
    }

    /**
     * 批量删除客户操作日志
     *
     * @param ids 需要删除的客户操作日志主键
     * @return 结果
     */
    @Override
    public int deleteCrmCompanyLogByIds(Long[] ids) {
        return crmCompanyLogMapper.deleteCrmCompanyLogByIds(ids);
    }

    /**
     * 删除客户操作日志信息
     *
     * @param id 客户操作日志主键
     * @return 结果
     */
    @Override
    public int deleteCrmCompanyLogById(Long id) {
        return crmCompanyLogMapper.deleteCrmCompanyLogById(id);
    }
}
